package com.lzq.aopdemo.controller;

import com.lzq.aopdemo.aspect.MyAspect;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {

    @RequestMapping("/hello")
    public String hello() {
        return "hello Spring";
    }

    @MyAspect
    @RequestMapping("/t1")
    public String t1() {
        return "t1";
    }

//    @RequestMapping("/t2")
//    public boolean t2() {
//        int a = 10/0;
//        return true;
//    }

    @MyAspect
    @RequestMapping("/t2")
    public boolean t2() {
        return true;
    }

}
